package sm.upgrade.converter;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import sm.dam.api.Converter;

public class PrimitiveToArrayConverter implements Converter {

	@Override
	public Object convert(Object value, Map<String, Object> owner) {
		Object newValue = value;
		if (!(value instanceof List)) {
			List<Object> array = new ArrayList<Object>();
			array.add(value);
			newValue = array;
		}

		return newValue;
	}

}
